package cn.iocoder.yudao.module.project.dal.mysql.internalcoderecycle;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.project.dal.dataobject.internalcoderecycle.InternalCodeRecycleDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.project.controller.admin.internalcoderecycle.vo.*;

/**
 * 内码作废信息 Mapper
 *
 * @author 武汉华诚
 */
@Mapper
public interface InternalCodeRecycleMapper extends BaseMapperX<InternalCodeRecycleDO> {

    default PageResult<InternalCodeRecycleDO> selectPage(InternalCodeRecyclePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<InternalCodeRecycleDO>()
                .eqIfPresent(InternalCodeRecycleDO::getInternalCodeId, reqVO.getInternalCodeId())
                .likeIfPresent(InternalCodeRecycleDO::getName, reqVO.getName())
                .eqIfPresent(InternalCodeRecycleDO::getExCode, reqVO.getExCode())
                .eqIfPresent(InternalCodeRecycleDO::getOrderCode, reqVO.getOrderCode())
                .eqIfPresent(InternalCodeRecycleDO::getOrderDetailId, reqVO.getOrderDetailId())
                .eqIfPresent(InternalCodeRecycleDO::getType, reqVO.getType())
                .eqIfPresent(InternalCodeRecycleDO::getMaterialCode, reqVO.getMaterialCode())
                .eqIfPresent(InternalCodeRecycleDO::getCartonCodes, reqVO.getCartonCodes())
                .eqIfPresent(InternalCodeRecycleDO::getBatchNumber, reqVO.getBatchNumber())
                .eqIfPresent(InternalCodeRecycleDO::getBatchCheckNumber, reqVO.getBatchCheckNumber())
                .betweenIfPresent(InternalCodeRecycleDO::getOperatingTime, reqVO.getOperatingTime())
                .eqIfPresent(InternalCodeRecycleDO::getRemark, reqVO.getRemark())
                .eqIfPresent(InternalCodeRecycleDO::getWeight, reqVO.getWeight())
                .eqIfPresent(InternalCodeRecycleDO::getWeightStatus, reqVO.getWeightStatus())
                .eqIfPresent(InternalCodeRecycleDO::getRigidity, reqVO.getRigidity())
                .eqIfPresent(InternalCodeRecycleDO::getRigidityStatus, reqVO.getRigidityStatus())
                .eqIfPresent(InternalCodeRecycleDO::getBalance, reqVO.getBalance())
                .eqIfPresent(InternalCodeRecycleDO::getBalanceStatus, reqVO.getBalanceStatus())
                .eqIfPresent(InternalCodeRecycleDO::getOperator, reqVO.getOperator())
                .betweenIfPresent(InternalCodeRecycleDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(InternalCodeRecycleDO::getRecycleId));
    }

}